0bcc0f9af71280c3838f6fa77abef891ca3931f3,plugins/git4idea/src/git4idea/branch/GitBranchOperation.java,GitBranchOperation,showUnmergedFilesNotification,#,203
Before Change
String title = UNMERGED_FILES_ERROR_TITLE;
String description = "You have to <a href='resolve'>resolve</a> all merge conflicts before checkout.<br/>" +
"After resolving conflicts you also probably would want to commit your files to the current branch.";
GitVcs.IMPORTANT_ERROR_NOTIFICATION.createNotification(title, description, NotificationType.ERROR, new NotificationListener() {
@Override public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED && event.getDescription().equals("resolve")) {
GitConflictResolver.Params params = new GitConflictResolver.Params().
setMergeDescription("The following files have unresolved conflicts. You need to resolve them before checking out.").
setErrorNotificationTitle("Unresolved files remain.");
new GitConflictResolver(myProject, GitUtil.getRoots(getRepositories()), params).merge();
}
}
}).notify(myProject);
}
}
After Change
private void showUnmergedFilesNotification() {
String title = UNMERGED_FILES_ERROR_TITLE;
String description = UNMERGED_FILES_ERROR_NOTIFICATION_DESCRIPTION;
NotificationManager.getInstance(myProject).notify(GitVcs.IMPORTANT_ERROR_NOTIFICATION, title, description, NotificationType.ERROR, new NotificationListener() {
@Override public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED && event.getDescription().equals("resolve")) {
GitConflictResolver.Params params = new GitConflictResolver.Params().
setMergeDescription("The following files have unresolved conflicts. You need to resolve them before checking out.").
setErrorNotificationTitle("Unresolved files remain.");
new GitConflictResolver(myProject, GitUtil.getRoots(getRepositories()), params).merge();
}
}
});
}
}